﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ThapCam.System;
using System.Data;
using ThapCam.Ulti;
using MySql.Data.MySqlClient;


namespace ThapCam.Provider
{
    public class WhatViewLogic : AbsPageLogic
    {
        public WhatViewLogic(ThapCamApplication application)
            : base(application)
        {
        }

        protected override void initData()
        {
        }

        public DataTable getListHot(int top)
        {
            SqlHelper helper = new SqlHelper();
            SqlParameter param_Limit = new SqlParameter("v_Limit", top, MySqlDbType.Int32);
            SqlParameter param_Offset = new SqlParameter("v_Offset", 0, MySqlDbType.Int32);
            DataTable table = helper.executeQuery("prc_TC_Subjects_GetListLimitNewest", CommandType.StoredProcedure, param_Limit, param_Offset);
            return table;
        }

        public DataTable getLimitListNewest(int limit, int offset)
        {
            SqlHelper helper = new SqlHelper();           
            SqlParameter param_Limit = new SqlParameter("v_Limit", limit, MySqlDbType.Int32);
            SqlParameter param_Offset = new SqlParameter("v_Offset", offset, MySqlDbType.Int32);
            DataTable table = helper.executeQuery("prc_TC_Subjects_GetListLimitNewest", CommandType.StoredProcedure, param_Limit, param_Offset);
            return table;
        }
    }
}